Certain embodiments of the present invention are directed to real-time clocks. More particularly, some embodiments of the invention provide systems and methods for frequency compensation of real-time clocks. Merely by way of example, some embodiments of the invention have been applied to temperature-dependent frequency compensation. But it would be recognized that the invention has a much broader range of applicability.
Real-time clocks (RTCs) often are used in electronics products to provide clocking or time-setting. These electronic products include mobile phones, digital cameras, computers, alarm clocks, electricity meters, watches, and/or smart home appliances. For real-time clocks, crystal oscillators often serve as driving sources, and frequency precision of the crystal oscillators usually determine precision of the real-time clocks. Conventional crystal oscillators often have a frequency precision error in the range of ±20 ppm at the room temperature and in the range wider than ±100 ppm at a higher temperature (e.g., at 70° C.) or at a lower temperature (e.g., at −30° C.). Specifically, ±20 ppm represents an error range of ±2 seconds per day, and ±100 ppm represents an error range of ±10 seconds per day. Such precision error ranges may not be acceptable under certain circumstances.
Frequency changes of crystal oscillators with temperature often can be curve-fitted, and the corresponding fitting coefficients can be obtained (e.g., through multiple iterations). For example, the desired frequency minus the actual frequency is represented by the frequency compensation. In another example, for a crystal oscillator, its frequency compensation as a function of temperature is as follows:Δf=aT3+bT2+cT+d  (Equation 1)where Δf represents the frequency compensation for the crystal oscillator, which is the desired frequency minus the actual frequency. Additionally, T represents the temperature of the crystal oscillator, and a, b, c and d represent coefficients.
Usually, the coefficients a, b, c and d are predetermined by measuring actual frequencies of the crystal oscillator at four different temperatures, and calculating the corresponding frequency compensation values at these four temperatures. For example, at each of these four temperatures, a real-time-clock system that contains the crystal oscillator is placed at that particular temperature (e.g., as measured by a temperature sensor) for a period of time in order to achieve thermal equilibrium of the system. Such period of time needed for each measurement often renders the calibration process inefficient. Each crystal oscillator needs to be measured at four different temperatures to determine its coefficients a, b, c and d as shown in Equation 1, and these four measurements need to be repeated for different crystal oscillators that may have different coefficient values.
In contrast, temperature-compensated crystal oscillators (TCXOs) usually have smaller frequency precision errors, but they often are much more expensive. The temperature-compensated crystal oscillators often are not feasible for low-cost designs.
Hence it is highly desirable to improve the techniques of temperature compensation for real-time-clock (RTC) systems.